<{include file="../common/iframe_header.tpl"}>
<link href="/css/uploadify.css" rel="stylesheet">
<div class="pad_10" style="margin-top: 40px;">
    <div class="table-list">
        <div class="common-form">
            <input type="file" name="upfile" id="uploadify"/>
            <div>
                请选择zip文件包，包内文件为所有网点此问卷下题目对标的附件，包内文件名格式为<br/><b>网点编号-题目编号-题目序号</b><br/>
                在线播放支持格式如下：图片jpg,jpeg,png,gif 音频视频mp3,wav,m4a,ogg,mp4,flv,fla
            </div>
        </form>
        </div>
    </div>
    <br/>
    <div class="table-list">
        <table width="100%">
        <thead>
            <tr>
                    <th>ZIP文件名</th>
                    <th>更新时间</th>
                    <th>处理结果</th>
                    <th>状态</th>
            </tr>
        </thead>
        <tbody>
            <{foreach $list as $key => $val}>
            <tr onMouseOver="this.className = 'tr2'" onMouseOut="this.className = 'tr1'" class="tr1" id="question_<{$val.question_id}>">
                    <td><{$val.zip_name}></td>
                    <td><{$val.update_time}></td>
                    <td><{$val.remark|msubstr:30}></td>
                    <td><{if $val.is_dispose==1}>未处理<{else}>已处理<{/if}></td>
            </tr>
            <{/foreach}>
        </tbody>
        </table>

        <div style="float:right;"><{$page}></div>
    </DIV>
</div>

   
<script src="/js/jquery.uploadify.min.js"></script>
<script type="text/javascript">
var project_email = "超大文件上传请联系项目邮箱<{$project_info.email}>,或者拆分多个文件上传";
    $('#uploadify').uploadify({
        //'debug': true,
		'fileSizeLimit' : '500MB',
        'formData'      : {'question_id' : '<{$question_id}>','project_id':'<{$project_info.project_id}>','bank_id':'<{$project_info.bank_id}>'},
        'buttonText' : '请选择ZIP文件',
        'fileObjName' : 'upfile',   
        'swf'      : '/js/uploadify.swf',
        'fileTypeExts' : '*.zip',
        'uploader' : '/webadmin/attach/zip',
        'onUploadSuccess' : function(file, data, response) {
            var obj = eval('(' + data + ')');
            if (obj.state =='SUCCESS'){
                alert('上传成功');
                window.parent.location.reload();
            } else {
                alert(obj.error);
            }
        } 
    });
    
</script>
<{include file="../common/footer.tpl"}>